\usepackage{graphicx}
\usepackage{latexsym}
%\usepackage{palatino}
\oddsidemargin = .3in
\textwidth = 6in

\headheight = 0in
\headsep = 0in
\topmargin = .25in
\textheight = 8.5in

\floatsep = .10in
\textfloatsep = \floatsep
\intextsep = \floatsep

\bibliographystyle{abbrv}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

% Almost everything is double spaced.
%
\newcommand{\spacing}{1}
\renewcommand{\baselinestretch}{\spacing}

% Footnotes are to be single spaced.
%
\newcommand{\famaffootnote}[1]{%
	\renewcommand{\baselinestretch}{1.0}%
	\footnote{#1}%
	\renewcommand{\baselinestretch}{\spacing}%
}

% Lengthy quotes must also be single spaced.
% We provide a parameter for the citation label too.
%
\newcommand{\famafquote}[2]{%
	\renewcommand{\baselinestretch}{1.0}%
	\normalsize
	\begin{quote}{``\textsl{#1}''~\cite{#2}}\end{quote}
	\renewcommand{\baselinestretch}{\spacing}%
	\normalsize
}

% Command for creating the thesis title page in accordance with the
% requirements of the School of Graduate Studies.
% For usage example, see thesis.tex.
%
\newcommand{\thesistitle}[4]{%
\thispagestyle{empty}
\begin{center}

\renewcommand{\baselinestretch}{1.0}%
\textbf{\Large #1}
\renewcommand{\baselinestretch}{\spacing}%

\vspace{1.0cm}

by \\
\copyright\ #2

\vspace{\fill}

\vspace{\fill}

#3 \\

\vspace{\fill}

\vspace{\fill}

#4 \\

\vspace{\fill}

\end{center}
}

%
% The \famafepsfig command is used to insert a new EPS figure 
% into our document.  Usage is:
%
%	\famafepsfig[scale]{filename}{caption}
%
% Note:
%	- scale is optional (defaults to 1.0)
%	- Assumes that the EPS file is in the 'figures' directory.
% 	- 'filename' should not include the filename extension.
%	- 'filename' also serves as the label for the figure.
%	- Ideally, we'd want to create a \newenvironment to do this
%	  but because the caption must appear below the figure, this
%	  doesn't appear to be possible.
%
\newcommand{\famafepsfig}[3][1.0]{%
	\begin{figure}[!htbp]
	\centering
	\vspace{2mm}
	\scalebox{#1}{\includegraphics{figures/#2.eps}}
	\caption{#3}
	\label{fig:#2}
	\end{figure}
}

%
% The \famaffig command is used to insert 'textual' figures
% into our document.  Usage is:
%
%	\famaffig{caption}{label}{content}
%
\newcommand{\famaffig}[3]{%
	\begin{figure}[!htbp]
	\centering
	\vspace{2mm}
	#3
	\caption{#1}
	\label{fig:#2}
	\end{figure}
}

%
% The \famaftab command is used to insert a new table into our document.
% Usage is:
%
%	\famaftab{table_format}{label}{caption}{table_contents}
%
% Note that we could have created a \newenvironment, but opted for
% a \newcommand so as to be consistent with the \famafepsfig command.
%
\newcommand{\famaftab}[4]{%
	\begin{table}[!htbp]
	\centering
	\caption{#3}
	\label{tab:#2}
	\vspace{2mm}
	\begin{tabular}{#1}
	#4
	\end{tabular}
	\end{table}
}

%
% The \famafeqn command is used to add an equation to the thesis.
% Usage is 
%
%	\famafeqn{label}{equation_body}
%
\newcommand{\famafeqn}[2]{%
	\begin{equation}
	\centering
	\label{eqn:#1}
	#2
	\end{equation}
}

%
% For theorems and corollaries.
%
\newtheorem{cor}{Corollary}
\newtheorem{thm}{Theorem}


\newcommand{\cppbegin}
{	
\lstset{language=C++,basicstyle=\footnotesize}	
\begin{lstlisting}[caption=Test]
dfgdfgdf
\end{lstlisting}
}

%\newcommand{\cppend}
%{	
%\end{lstlisting}
%}
